﻿using System;
using Adalbertus.BudgetPlanner.Domain;
using Adalbertus.BudgetPlanner.Domain.Repositories;
using Adalbertus.BudgetPlanner.Infrastructure.Repositories;

namespace Adalbertus.BudgetPlanner.Infrastructure
{
    public class RepositoryFactory : IRepositoryFactory
    {
        public IBudgetRepository CreateBudgetRepository(IUnitOfWork unitOfWork)
        {
            return new BudgetRepository(unitOfWork);
        }

        public ICashFlowRepository CreateCashFlowRepository(IUnitOfWork unitOfWork)
        {
            return new CashFlowRepository(unitOfWork);
        }

        public IRepository<TDomain> CreateRepository<TDomain>(IUnitOfWork unitOfWork)
        {
            return new Repository<TDomain>(unitOfWork);
        }
    }
}
